package com.example.manage_dzensaas.controller.invoke;

import com.example.manage_dzensaas.pojo.bo.card.QueryCardBo;
import com.example.manage_dzensaas.pojo.result.ApiResult;
import com.example.manage_dzensaas.pojo.vo.CardInfoVo;
import com.example.manage_dzensaas.service.CardInvokeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.noear.solon.annotation.*;
import org.noear.solon.validation.annotation.Valid;
import org.noear.solon.validation.annotation.Validated;

/**
 * @author wangzhiqi
 * @version 1.0
 * @description: 外调卡卷管理
 * @date 2025/2/12 15:05
 */
@Api("外调卡卷管理")
@Valid
@Controller
@Mapping("/invoke/cake")
public class CardInvokeController {

    @Inject
    CardInvokeService cardInvokeService;


    @ApiOperation(value = "查询卡卷", notes = "根据卡卷兑换码查询卡卷")
    @Post
    @Mapping("/listByCard")
    public ApiResult<CardInfoVo> listByCard(@ApiParam(value = "查询条件", required = true)@Validated @Body QueryCardBo queryCardBo) {
        return cardInvokeService.listByCard(queryCardBo);
    }
}
